package datamodel;

import java.util.ArrayList;
import java.util.List;

import communication.DomainClass;
import communication.Enum;
import communication.Model;
import communication.Type;

public class ModelHelper {
	public static List<DomainClass> getDomainClassList(Model model) {
		List<DomainClass> domainClasses = new ArrayList<DomainClass>();
		for (Type type : model.getContainsTypes()) {
			if(type instanceof DomainClass){
				domainClasses.add((DomainClass) type);
			}
		}
		return domainClasses;
	}
	
	public static List<Enum> getEnumList(Model model) {
		List<Enum> enums = new ArrayList<Enum>();
		for (Type type : model.getContainsTypes()) {
			if(type instanceof Enum){
				enums.add((Enum) type);
			}
		}
		return enums;
	}
}
